import javax.swing.JPanel;
import javax.swing.JButton;
import javax.swing.JLabel;
import java.awt.Color;
import javax.swing.ImageIcon;
import java.awt.event.ActionListener;
import java.awt.event.ActionEvent;
import java.awt.Font;

public class GoToJailUI extends JPanel {
	private BoardUi board;
	private JButton btnReturn;

	public GoToJailUI(Player currentPlayer, GoToJail goToJail, BoardUi board_) {
		
		this.board=board_;
		setBackground(new Color(255, 228, 196));
		setLayout(null);
		
		
		JLabel label = new JLabel("");
		label.setIcon(new ImageIcon(GoToJailUI.class.getResource("/TitleDeeds/GoToJailUi.jpg")));
		label.setBounds(0, 0, 200, 200);
		add(label);
		
		btnReturn = new JButton("Return");
		btnReturn.addActionListener(new ActionListener() {
			public void actionPerformed(ActionEvent arg0) {
				board.getGameButtonUI().enableEndTurnBtn();
				visibility();
			}
		});
		btnReturn.setBounds(191, 89, 89, 23);
		add(btnReturn);	
	}
	public void visibility(){
		setVisible(false);
	}


}
